﻿using System.Web.SessionState;

namespace RHD.Common.Web.Utility {
	public class SessionManager {
		private readonly HttpSessionState Session;

		public SessionManager(HttpSessionState Session) {
			this.Session = Session;
		}

		public T GetData<T>(SessionTypes type) {
			return (T)this.Session[type.GetType().FullName + "." + type];
		}

		public void SetData(SessionTypes type, object obj) {
			this.Session[type.GetType().FullName + "." + type] = obj;
		}
	}

	public enum SessionTypes {
		PRINCIPAL
	}
}